const express = require('express');
const app = express();
// const port = 3000;

// Parse the body to requests
const body_parser = require('body-parser');
app.use(body_parser.json({ type: 'application/*+json' }));
app.use(body_parser.raw({ type: 'application/vnd.custom-type' }));
app.use(body_parser.text({ type: 'text/html' }));
app.use(body_parser.urlencoded({ extended: true }));
app.use(body_parser.json());

//Other module
const example = require('./business/example');
app.use('/example', example);
app.listen(process.env.SERVICE_PORT || 3000, () => console.log(`Service listening at http://localhost:${process.env.SERVICE_PORT || 3000}`));
